package com.hongyuan.venue.ui.person.beans;


import com.hongyuan.venue.utils.TimeUtil;

import java.io.Serializable;
import java.util.List;

public class MyOrdersBean implements Serializable {


    /**
     * page : 10
     * curpage : 1
     * page_total : 1
     * list : [{"o_time":1606644279,"o_name":"场馆预约","o_out_id":338,"o_state":1,"m_id":3,"o_money":"30.00","o_coupon_money":"0.00","o_id":27052,"og_id":338,"o_pay_state":0,"min_time":1606708800,"last_time":1606719600,"os_logo":"http://hongyuangood.oss-cn-hangzhou.aliyuncs.com/uplaod/image/20190814/6c6fb1bfc62e2c13031096593660c5fc05a6fdea_800x254.jpg","os_name":"湖州首玺健身湖东店","os_id":22,"gc_name":"游泳","ogm_mx":[{"mx_id":492,"og_id":338,"s_time":1606708800,"e_time":1606714200,"area_price":"10.00","area_id":108,"area_name":"场地1","mx_state":0,"mx_order_state":1,"mx_time":0,"is_refund":0,"refund_state":0,"refund_money":"0.00","out_request_no":"","refund_apply_time":0,"refund_success_time":0,"refund_reason":""},{"mx_id":493,"og_id":338,"s_time":1606708800,"e_time":1606714200,"area_price":"10.00","area_id":109,"area_name":"场地2","mx_state":0,"mx_order_state":1,"mx_time":0,"is_refund":0,"refund_state":0,"refund_money":"0.00","out_request_no":"","refund_apply_time":0,"refund_success_time":0,"refund_reason":""},{"mx_id":494,"og_id":338,"s_time":1606714200,"e_time":1606719600,"area_price":"10.00","area_id":108,"area_name":"场地1","mx_state":0,"mx_order_state":1,"mx_time":0,"is_refund":0,"refund_state":0,"refund_money":"0.00","out_request_no":"","refund_apply_time":0,"refund_success_time":0,"refund_reason":""}],"gc_id":5,"og_state":"1"}]
     */

    private int page;
    private int curpage;
    private int page_total;
    private List<ListBean> list;

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getCurpage() {
        return curpage;
    }

    public void setCurpage(int curpage) {
        this.curpage = curpage;
    }

    public int getPage_total() {
        return page_total;
    }

    public void setPage_total(int page_total) {
        this.page_total = page_total;
    }

    public List<ListBean> getList() {
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    public static class ListBean implements Serializable{
        /**
         * o_time : 1606644279
         * o_name : 场馆预约
         * o_out_id : 338
         * o_state : 1
         * m_id : 3
         * o_money : 30.00
         * o_coupon_money : 0.00
         * o_id : 27052
         * og_id : 338
         * o_pay_state : 0
         * min_time : 1606708800
         * last_time : 1606719600
         * os_logo : http://hongyuangood.oss-cn-hangzhou.aliyuncs.com/uplaod/image/20190814/6c6fb1bfc62e2c13031096593660c5fc05a6fdea_800x254.jpg
         * os_name : 湖州首玺健身湖东店
         * os_id : 22
         * gc_name : 游泳
         * ogm_mx : [{"mx_id":492,"og_id":338,"s_time":1606708800,"e_time":1606714200,"area_price":"10.00","area_id":108,"area_name":"场地1","mx_state":0,"mx_order_state":1,"mx_time":0,"is_refund":0,"refund_state":0,"refund_money":"0.00","out_request_no":"","refund_apply_time":0,"refund_success_time":0,"refund_reason":""},{"mx_id":493,"og_id":338,"s_time":1606708800,"e_time":1606714200,"area_price":"10.00","area_id":109,"area_name":"场地2","mx_state":0,"mx_order_state":1,"mx_time":0,"is_refund":0,"refund_state":0,"refund_money":"0.00","out_request_no":"","refund_apply_time":0,"refund_success_time":0,"refund_reason":""},{"mx_id":494,"og_id":338,"s_time":1606714200,"e_time":1606719600,"area_price":"10.00","area_id":108,"area_name":"场地1","mx_state":0,"mx_order_state":1,"mx_time":0,"is_refund":0,"refund_state":0,"refund_money":"0.00","out_request_no":"","refund_apply_time":0,"refund_success_time":0,"refund_reason":""}]
         * gc_id : 5
         * og_state : 1
         */

        private int o_time;
        private String o_name;
        private int o_out_id;
        private int o_state;
        private int m_id;
        private String o_money;
        private String o_coupon_money;
        private int o_id;
        private int og_id;
        private int o_pay_state;
        private int min_time;
        private int last_time;
        private String os_logo;
        private String os_name;
        private int os_id;
        private String gc_name;
        private int gc_id;
        private String og_state;
        private List<OgmMxBean> ogm_mx;

        public String getO_time() {
            return TimeUtil.getStringByFormat(o_time*1000,TimeUtil.dateFormatYMDHMS);
        }

        public void setO_time(int o_time) {
            this.o_time = o_time;
        }

        public String getO_name() {
            return o_name;
        }

        public void setO_name(String o_name) {
            this.o_name = o_name;
        }

        public int getO_out_id() {
            return o_out_id;
        }

        public void setO_out_id(int o_out_id) {
            this.o_out_id = o_out_id;
        }

        public int getO_state() {
            return o_state;
        }

        public void setO_state(int o_state) {
            this.o_state = o_state;
        }

        public int getM_id() {
            return m_id;
        }

        public void setM_id(int m_id) {
            this.m_id = m_id;
        }

        public String getO_money() {
            return o_money;
        }

        public void setO_money(String o_money) {
            this.o_money = o_money;
        }

        public String getO_coupon_money() {
            return o_coupon_money;
        }

        public void setO_coupon_money(String o_coupon_money) {
            this.o_coupon_money = o_coupon_money;
        }

        public int getO_id() {
            return o_id;
        }

        public void setO_id(int o_id) {
            this.o_id = o_id;
        }

        public int getOg_id() {
            return og_id;
        }

        public void setOg_id(int og_id) {
            this.og_id = og_id;
        }

        public int getO_pay_state() {
            return o_pay_state;
        }

        public String getStrO_pay_state() {
            if("1".equals(og_state)){
                return "待支付";
            }else if("2".equals(og_state)){
                return "已取消";
            }else if("3".equals(og_state)){
                return "已完成";
            }else if("4".equals(og_state)){
                return "已支付";
            }else if("8".equals(og_state)){
                return "已评价完成";
            }else if("9".equals(og_state)){
                return "已退款";
            }
            return "";
        }

        public void setO_pay_state(int o_pay_state) {
            this.o_pay_state = o_pay_state;
        }

        public int getMin_time() {
            return min_time;
        }

        public void setMin_time(int min_time) {
            this.min_time = min_time;
        }

        public int getLast_time() {
            return last_time;
        }

        public void setLast_time(int last_time) {
            this.last_time = last_time;
        }

        public String getOs_logo() {
            return os_logo;
        }

        public void setOs_logo(String os_logo) {
            this.os_logo = os_logo;
        }

        public String getOs_name() {
            return os_name;
        }

        public void setOs_name(String os_name) {
            this.os_name = os_name;
        }

        public int getOs_id() {
            return os_id;
        }

        public void setOs_id(int os_id) {
            this.os_id = os_id;
        }

        public String getGc_name() {
            return gc_name;
        }

        public void setGc_name(String gc_name) {
            this.gc_name = gc_name;
        }

        public int getGc_id() {
            return gc_id;
        }

        public void setGc_id(int gc_id) {
            this.gc_id = gc_id;
        }

        public String getOg_state() {
            return og_state;
        }

        public void setOg_state(String og_state) {
            this.og_state = og_state;
        }

        public List<OgmMxBean> getOgm_mx() {
            return ogm_mx;
        }

        public void setOgm_mx(List<OgmMxBean> ogm_mx) {
            this.ogm_mx = ogm_mx;
        }

        public String getTextO_num() {
            return "共"+ogm_mx.size()+"个预约";
        }

        public static class OgmMxBean implements Serializable{
            /**
             * mx_id : 492
             * og_id : 338
             * s_time : 1606708800
             * e_time : 1606714200
             * area_price : 10.00
             * area_id : 108
             * area_name : 场地1
             * mx_state : 0
             * mx_order_state : 1
             * mx_time : 0
             * is_refund : 0
             * refund_state : 0
             * refund_money : 0.00
             * out_request_no :
             * refund_apply_time : 0
             * refund_success_time : 0
             * refund_reason :
             */

            private int mx_id;
            private int og_id;
            private int s_time;
            private int e_time;
            private String area_price;
            private int area_id;
            private String area_name;
            private int mx_state;
            private int mx_order_state;
            private int mx_time;
            private int is_refund;
            private int refund_state;
            private String refund_money;
            private String out_request_no;
            private int refund_apply_time;
            private int refund_success_time;
            private String refund_reason;

            public int getMx_id() {
                return mx_id;
            }

            public void setMx_id(int mx_id) {
                this.mx_id = mx_id;
            }

            public int getOg_id() {
                return og_id;
            }

            public void setOg_id(int og_id) {
                this.og_id = og_id;
            }

            public int getS_time() {
                return s_time;
            }

            public void setS_time(int s_time) {
                this.s_time = s_time;
            }

            public int getE_time() {
                return e_time;
            }

            public void setE_time(int e_time) {
                this.e_time = e_time;
            }

            public String getArea_price() {
                return area_price;
            }

            public void setArea_price(String area_price) {
                this.area_price = area_price;
            }

            public int getArea_id() {
                return area_id;
            }

            public void setArea_id(int area_id) {
                this.area_id = area_id;
            }

            public String getArea_name() {
                return area_name;
            }

            public void setArea_name(String area_name) {
                this.area_name = area_name;
            }

            public int getMx_state() {
                return mx_state;
            }

            public void setMx_state(int mx_state) {
                this.mx_state = mx_state;
            }

            public int getMx_order_state() {
                return mx_order_state;
            }

            public void setMx_order_state(int mx_order_state) {
                this.mx_order_state = mx_order_state;
            }

            public int getMx_time() {
                return mx_time;
            }

            public void setMx_time(int mx_time) {
                this.mx_time = mx_time;
            }

            public int getIs_refund() {
                return is_refund;
            }

            public void setIs_refund(int is_refund) {
                this.is_refund = is_refund;
            }

            public int getRefund_state() {
                return refund_state;
            }

            public void setRefund_state(int refund_state) {
                this.refund_state = refund_state;
            }

            public String getRefund_money() {
                return refund_money;
            }

            public void setRefund_money(String refund_money) {
                this.refund_money = refund_money;
            }

            public String getOut_request_no() {
                return out_request_no;
            }

            public void setOut_request_no(String out_request_no) {
                this.out_request_no = out_request_no;
            }

            public int getRefund_apply_time() {
                return refund_apply_time;
            }

            public void setRefund_apply_time(int refund_apply_time) {
                this.refund_apply_time = refund_apply_time;
            }

            public int getRefund_success_time() {
                return refund_success_time;
            }

            public void setRefund_success_time(int refund_success_time) {
                this.refund_success_time = refund_success_time;
            }

            public String getRefund_reason() {
                return refund_reason;
            }

            public void setRefund_reason(String refund_reason) {
                this.refund_reason = refund_reason;
            }

            /*
             * 获取显示时间
             * */
            public String showTimeText(){
                return TimeUtil.getStringByFormat(s_time*1000,TimeUtil.dateFormatDotYMDHM) +"-"+ TimeUtil.getStringByFormat(e_time*1000,TimeUtil.dateFormatHM);
            }
        }
    }
}
